package com.itheima.IO流.day01.字节流FileInputStream;

import java.io.FileOutputStream;
import java.io.IOException;

public class Demo3 {
    public static void main(String[] args) {
        FileOutputStream fos = null;
        try {
            int i=2/0;
            fos = new FileOutputStream("day10的IO流01\\a.txt",true);
            fos.write("hello,finally....".getBytes());
            fos.write(System.lineSeparator().getBytes());
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (fos != null) {
                    fos.close();
                }
            } catch (IOException e) {
                e.printStackTrace();
            }

            System.out.println("finally..............");
        }
    }
}
